nclude <iostream>
#include <string>
#include <algorithm>

using namespace std;

bool isCir(string s)
{
    //边界控制需要-1
    int begin = 0,end = s.size() - 1;
    while(begin < end)
    {
        if(s[begin] != s[end])
            return false;

        end--;
        begin++;
    }
    return true;
}

int main() 
{
    string s1, s2, tmp;
    int count = 0;
    cin >> s1 >> s2;

    for(int i = 0; i <= s1.size(); i++)
    {
        tmp = s1;
        tmp.insert(i, s2);
        if(isCir(tmp))
            count++;
    }

    cout << count;
}
// 64 位输出请用 printf("%lld")
//
//
// #include <iostream>
#include <algorithm>
#include <utility>
#include <vector>
using namespace std;

int getmax(int a, int b)
{
    return (a) > (b) ? (a) : (b);
}

int main() 
{
    int n;
    cin >> n;

    vector<int> v(n);

    for(int i = 0; i < n; i++)
    {
        cin >> v[i];
    }

    int sum = v[0];
    int max = v[0];
    

    for(int i = 1; i < n; i++)
    {
        sum = getmax(sum + v[i], v[i]);
        if(sum >= max)
            max = sum;
    }

    cout << max;

    return 0;
}
// 64 位输出请用 printf("%lld")
//
//
// class Solution {
public:
    int minSubArrayLen(int target, vector<int>& nums) 
    {
        int ret = INT_MAX, sum = 0, n = nums.size();
        for(int left = 0,  right = 0; right < n; ++right)
        {
            sum += nums[right];
            while(sum >= target)
            {
                ret = min(ret,right - left + 1);
                left++;
                sum -= nums[left - 1]; 
            }
        }

        return ret == INT_MAX ? 0 : ret;
    }
};
